TYPE_MODULES:=General Osmocom MNCC PCUIF

TYPE_CC=$(TYPE_MODULES:%=%_Types.cc)
TYPE_HH=$(TYPE_MODULES:%=%_Types.hh)
TYPE_OBJS=$(TYPE_MODULES:%=%_Types.o)
GENERATED=$(TYPE_CC) $(TYPE_HH)

OBJS=$(TYPE_OBJS) hello.o MNCC_EncDec.o

CXXFLAGS=-DLINUX -DMAKEDEPEND_RUN -I/usr/include/titan -fPIC
LDFLAGS=-L/usr/lib/titan -fPIC -lttcn3-dynamic
LDFLAGS_STATIC=-L/usr/lib/titan -lttcn3 -lxml2 -lssl -lcrypto

all: titan.a

$(GENERATED):
	ttcn3_compiler *.ttcn

titan.a: $(OBJS)
	$(AR) r $@ $^

%.o: %.cc
	$(CXX) $(CXXFLAGS) -c -o $@ $^

.PHONY: clean
clean:
	@rm -f titan.a $(OBJS) $(GENERATED)
